<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
    <script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script>
    <script type="text/javascript" src="js/index.js"></script>
    <link type="text/css" rel="stylesheet" href="index.css">
    <title>Sliding Tiles Puzzle</title>
</head>

<body>

    <div class="container">
        <div class="grid-container">
            <h2> 8-puzzle </h2>
            <!-- 初始布局 -->
            <div class="grid">
                <div class="row">
                    <div class="cell" data-pos="0,0"><span>6</span></div>
                    <div class="cell" data-pos="0,1"><span>4</span></div>
                    <div class="cell" data-pos="0,2"><span>7</span></div>
                </div>
                <div class="row">
                    <div class="cell" data-pos="1,0"><span>8</span></div>
                    <div class="cell" data-pos="1,1"><span>5</span></div>
                    <div class="cell" id="empty" data-pos="1,2"></div>
                </div>
                <div class="row">
                    <div class="cell" data-pos="2,0"><span>3</span></div>
                    <div class="cell" data-pos="2,1"><span>2</span></div>
                    <div class="cell" data-pos="2,2"><span>1</span></div>
                </div>
            </div>
        </div>
    </div>

    </body>
</html>
    <!-- https://www.cnblogs.com/magic-sea/p/12081180.html -->